home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Tools / Text-Viewer / Notes / english / Basskey.file < prev    next >
Text File  |  1999-11-06  |  38KB  |  1,261 lines

  1. /* subprogramm for Notes.pprx */
  2.  
  3. signal on halt
  4. signal on break_c
  5. signal on break_e
  6. signal on break_d
  7. call ppm_SetStyle(N)
  8. call ppm_SetMagMode(180)
  9. call ppm_UpdateScreen()
  10.  
  11. noteneingabe:
  12.     /* smallest notedistance */
  13.  
  14.     sysart = "notesystem:2"
  15.     systemart = ppm_Getform("Please repeat your choice of the notesystems... (2, 1v oder 1b)", 3, sysart)
  16.     select
  17.     when systemart == '2' then zdist = 4
  18.     when systemart == '1v' then zdist = 2
  19.     when systemart == '1b' then zdist = 2
  20.     otherwise noteneingabe()
  21.     end
  22.     zdist2 = zdist-2
  23.     xgrdform = "(1,2,4,8 oder 16)"
  24.     xgrd = ppm_GetForm("Pleace give in the smallest note distance ...(nothing=Break!)", 3, xgrdform)
  25.     if xgrd == '' then exit_msg("Break")
  26.     select
  27.      when xgrd == '1' then xg =0.7
  28.      when xgrd == '2' then xg =1.4
  29.      when xgrd == '4' then xg =2.8
  30.      when xgrd == '8' then xg =5.6
  31.      when xgrd == '16' then xg =11.2
  32.      otherwise noteneingabe()
  33.     end
  34.  
  35.    /* pointmessure of the notes */
  36.    notepkt = 26
  37.    call ppm_SetJustification(0)
  38.  
  39.    zz = 0 /* linecounter (german=Zeilenzähler) */
  40.    notex = 2.5
  41.    page = ppm_CurrentPage()
  42.  
  43. pfad:
  44.    do
  45.            choose=ppm_Inform(2,"Please choose the notefile or break ...", "Break","File")
  46.            if choose == 0 then exit_msg("Break!")
  47.            eingabe = ppm_GetFileName("Pleace choose the notescriptfile  ...", "Notes:")
  48.            res = OPEN(notenfile, eingabe, 'R')
  49.            if res == 0 then
  50.              do
  51.                  call ppm_inform(1,"There was an error, or the file doesn't exists!!!","OK")
  52.                  pfad()
  53.              end
  54.            call ppm_ShowStatus("OK, I'm working ...")
  55.            auslesen(notenfile)
  56.    end
  57.  
  58.     /* x-distance of the notes  */
  59. auslesen:
  60.         do
  61.           parse arg file
  62.           noten = READCH(file, 4000)
  63.           i=1
  64.           do forever
  65.             nw = word(noten, i)
  66.             nn = word(noten, i+1)
  67.             al = word(noten, i+2)
  68.             if nw == 'P' then nw = 'p'
  69.             if nw == 'D' then nw = 'd'
  70.             if nw == 'C' then nw = 'c'
  71.             if nw == 'L' then nw = 'l'
  72.             if nn == 'L' then nn = 'l'
  73.             if nw == 'J' then nw = 'j'
  74.             if nw == 'END' then nw = 'end'
  75.             select
  76.               when al == (X2C(4e0a)) then al = 'n'
  77.               when al == (X2C(6e0a)) then al = 'n'
  78.               when al == (X2C(300a)) then al = '0'
  79.               otherwise exit_msg("There was an error!")
  80.             end
  81.  
  82.             select
  83.               when nn=='DB1' then nn = 'Db1'
  84.               when nn=='GB1' then nn = 'Gb1'
  85.               when nn=='BB1' then nn = 'Bb1'
  86.               when nn=='AB1' then nn = 'Ab1'
  87.               when nn=='DB2' then nn = 'Db2'
  88.               when nn=='EB2' then nn = 'Eb2'
  89.               when nn=='BB2' then nn = 'Bb2'
  90.               when nn=='GB2' then nn = 'Gb2'
  91.               when nn=='AB2' then nn = 'Ab2'
  92.               when nn=='DB3' then nn = 'Db3'
  93.               when nn=='EB3' then nn = 'Eb3'
  94.               when nn=='BB3' then nn = 'Bb3'
  95.               when nn=='GB3' then nn = 'Gb3'
  96.               when nn=='AB3' then nn = 'Ab3'
  97.               otherwise NOP
  98.             end
  99.  
  100.             call auswahl()
  101.             i=i+3
  102.           end
  103.         end
  104.  
  105. auswahl:
  106. do
  107.     select
  108.       when nw == 'j' then do
  109.                           zz = 0   /* linecounter */
  110.                           notex = 2.5
  111.                           return
  112.                           end
  113.       when nw == 'end' then
  114.         do
  115.             call ppm_ClearStatus()
  116.             exit_msg("Ready!")
  117.         end
  118.       when nw == 's' then
  119.           do
  120.           xw = xg/16
  121.           nw='x'
  122.           yv = 0
  123.           end
  124.       when nw  == 'S' then
  125.           do
  126.           xw = xg/16
  127.           nw='X'
  128.           yv = 0.47
  129.           end
  130.       when nw == 'e' then
  131.           do
  132.           xw = xg/8
  133.           nw='e'
  134.           yv = 0
  135.           end
  136.       when nw == 'E' then
  137.           do
  138.           xw = xg/8
  139.           nw='E'
  140.           yv = 0.47
  141.           end
  142.       when nw == 'q' then
  143.           do
  144.           xw = xg/4
  145.           nw='q'
  146.           yv = 0
  147.           end
  148.       when nw == 'Q' then
  149.           do
  150.           xw = xg/4
  151.           nw='Q'
  152.           yv = 0.47
  153.           end
  154.       when nw == 'h' then
  155.           do
  156.           xw = xg/2
  157.           yv = 0
  158.           end
  159.       when nw == 'H' then
  160.           do
  161.           xw = xg/2
  162.           yv = 0.47
  163.           end
  164.       when nw == 'w' then
  165.           do
  166.           xw = xg
  167.           nw='w'
  168.           yv = 0
  169.           end
  170.       when nw == 'W' then
  171.           do
  172.           xw = xg
  173.           nw='W'
  174.           yv = 0.47
  175.           end
  176.  
  177.       when nw == 'pt' then
  178.           do
  179.             if notex < 3 then
  180.             do
  181.               notex = bakx
  182.               zz = zz - zdist
  183.               call ppm_SetSize(25)
  184.               box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  185.               call ppm_SetSize(20)
  186.               call ppm_TextIntoBox(box#id, 'd')
  187.             end
  188.             else
  189.             do
  190.               call ppm_SetSize(25)
  191.               box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  192.               call ppm_SetSize(20)
  193.               call ppm_TextIntoBox(box#id, 'd')
  194.             end
  195.              select
  196.                  when nn == '1' then
  197.                  do
  198.                   xw = xg
  199.                   notex = notex+xw
  200.                  end
  201.                  when nn == '2' then
  202.                  do
  203.                   xw = xg/2
  204.                   notex = notex+xw
  205.                  end
  206.                  when nn == '4' then
  207.                  do
  208.                   xw = xg/4
  209.                   notex = notex+xw
  210.                  end
  211.                  when nn == '8' then
  212.                  do
  213.                   xw = xg/8
  214.                   notex = notex+xw
  215.                  end
  216.                  when nn == '16' then
  217.                  do
  218.                   xw  = xg/16
  219.                   notex = notex+xw
  220.                  end
  221.                  when nn == 'l' then
  222.                  do
  223.                   xw  = 0.2
  224.                   notex = notex+xw
  225.                  end
  226.                  otherwise
  227.                   do
  228.                    call ppm_ClearStatus()
  229.                    exit_msg("There was an error")
  230.                   end
  231.              end
  232.            if notex >=18.7 then
  233.                do
  234.                  notex = 2.5
  235.                  zz = zz + zdist
  236.                end
  237.            return
  238.           end
  239.  
  240.       when nw == 'PT' then
  241.           do
  242.             if notex < 3 then
  243.             do
  244.               notex = bakx
  245.               zz = zz - zdist
  246.               call ppm_SetSize(25)
  247.               box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  248.               call ppm_SetSize(20)
  249.               call ppm_TextIntoBox(box#id, 'd')
  250.             end
  251.             else
  252.             do
  253.               call ppm_SetSize(25)
  254.               box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
  255.               call ppm_SetSize(20)
  256.               call ppm_TextIntoBox(box#id, 'd')
  257.             end
  258.            select
  259.                when nn == '1' then
  260.                 do
  261.                  xw = xg
  262.                  notex = notex+xw
  263.                 end
  264.                when nn == '2' then
  265.                 do
  266.                  xw = xg/2
  267.                  notex = notex+xw
  268.                 end
  269.                when nn == '4' then
  270.                 do
  271.                  xw = xg/4
  272.                  notex = notex+xw
  273.                 end
  274.                when nn == '8' then
  275.                 do
  276.                  xw = xg/8
  277.                  notex = notex+xw
  278.                 end
  279.                when nn == '16' then
  280.                 do
  281.                  xw  = xg/16
  282.                  notex = notex+xw
  283.                 end
  284.                when nn == 'l' then
  285.                 do
  286.                  xw  = 0.2
  287.                  notex = notex+xw
  288.                 end
  289.                otherwise
  290.                do
  291.                 call ppm_ClearStatus()
  292.                 exit_msg("There was an error")
  293.                end
  294.            end
  295.            if notex >=18.7 then
  296.              do
  297.                notex = 2.5
  298.                zz = zz + zdist
  299.              end
  300.            return
  301.           end
  302.  
  303.  
  304.       /* barline */
  305.       when nw =